package com.dd.cloud.user.service.file;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dd.cloud.user.entity.file.AppVersion;
import com.dd.cloud.user.req.file.AppVersionCreateReq;
import com.dd.cloud.user.req.file.AppVersionQueryTermsReq;
import com.dd.cloud.user.req.file.AppVersionUpdateReq;
import com.dd.cloud.user.res.file.HwObsParamRes;

/**
 * @author Lx
 * @version 1.0
 */
public interface IAppVersionService extends IService<AppVersion> {
    /**
     * 检查版本
     *
     * @param appId
     * @param version
     * @param type
     * @return
     */
    AppVersion checkAppVersion(String appId, String version, Integer type);

    /**
     * 查询app版本列表
     *
     * @param req
     * @return
     */
    IPage<AppVersion> queryAppVersionPageTerms(AppVersionQueryTermsReq req);

    /**
     * 添加app版本信息
     *
     * @param req
     * @return
     */
    AppVersion addAppVersion(AppVersionCreateReq req);

    /**
     * 修改app版本信息
     *
     * @param req
     * @return
     */
    AppVersion updateAppVersion(AppVersionUpdateReq req);

    /**
     * 华为云obs参数
     */
    HwObsParamRes obsParam();

    /**
     * 修改app版本状态
     */
    void updateAppVersionStatus(Integer id, Integer status);

    /**
     * app下载次数增加
     */
    void updateAppDownloadNum(String version, Integer type);
}
